package com.huanrong.task;

import javax.annotation.PostConstruct;

import org.apache.log4j.Logger;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class LogTask
{
    private static Logger logger = Logger.getLogger(LogTask.class);
    
    @PostConstruct
    public void run()
    {
        logger.info("初始化时需要运行这个方法");
    }
    
    /**
     * 每五秒执行一次
     * 
     * @Description
     * @author congyue.lu
     */
    //@Scheduled(cron = "0/5 * *  * * ? ")
    public void logRun()
    {
        logger.info("每隔一段时间需要运行这个方法");
    }
    
}
